package com.yhy.wxzn.wcs.entity;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yhy.wxzn.wcs.device.rgv.enums.NodeType;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 地图配置
 * @Author: jeecg-boot
 * @Date:   2023-10-31
 * @Version: V1.0
 */
@Data
@TableName("wcs_map_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="wcs_map_info对象", description="地图配置")
public class WcsMapInfo implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
	/**x坐标*/
	@Excel(name = "x坐标", width = 15)
    @ApiModelProperty(value = "x坐标")
    private java.lang.Integer x;
	/**y坐标*/
	@Excel(name = "y坐标", width = 15)
    @ApiModelProperty(value = "y坐标")
    private java.lang.Integer y;
	/**z坐标*/
	@Excel(name = "z坐标", width = 15)
    @ApiModelProperty(value = "z坐标")
    private java.lang.Integer z;
	/**类型*/
	@Excel(name = "类型", width = 15)
    @ApiModelProperty(value = "类型")
    /**
     * {@link com.yhy.wxzn.common.enums.WcsDeviceTypeEnums}
     * */
    @Dict(dicCode = "wcs_device_type")
    private java.lang.Integer type;
    /**货位类型*/
    @Excel(name = "货位类型", width = 15)
    @ApiModelProperty(value = "货位类型")
    /**
     * {@link NodeType}
     * */
    @Dict(dicCode = "wcs_node_type")
    private Integer nodeType;
	/**容器号*/
	@Excel(name = "容器号", width = 15)
    @ApiModelProperty(value = "容器号")
    private java.lang.String palletCode;
	/**是否启用*/
	@Excel(name = "是否启用", width = 15)
    @ApiModelProperty(value = "是否启用")
    @Dict(dicCode = "valid_status")
    /**
     * {@link com.yhy.wxzn.common.enums.ValidEnums}
     * */
    private Boolean status;
	/**x坐标备用*/
	@Excel(name = "x坐标备用", width = 15)
    @ApiModelProperty(value = "x坐标备用")
    private java.lang.Integer plcX;
	/**y坐标备用*/
	@Excel(name = "y坐标备用", width = 15)
    @ApiModelProperty(value = "y坐标备用")
    private java.lang.Integer plcY;
	/**z坐标备用*/
	@Excel(name = "z坐标备用", width = 15)
    @ApiModelProperty(value = "z坐标备用")
    private java.lang.Integer plcZ;
	/**坐标*/
	@Excel(name = "wms坐标", width = 15)
    @ApiModelProperty(value = "wms坐标")
    private java.lang.String coord;
	/**巷道号(堆垛机用)*/
	@Excel(name = "巷道号(堆垛机用)", width = 15)
    @ApiModelProperty(value = "巷道号(堆垛机用)")
    private java.lang.Integer roadNum;
	//地码
	private String groundCode;
	//有无货
	private String nodeStatus;
	//可向上
    @Dict(dicCode = "wms_bool")
    private Boolean beUp;
    @Dict(dicCode = "wms_bool")
    private Boolean beDown;
    @Dict(dicCode = "wms_bool")
    private Boolean beLeft;
    @Dict(dicCode = "wms_bool")
    private Boolean beRight;

    /**
     * x轴位移量，单位：mm
     */
    private Integer offsetX;
    private Integer offsetY;



    public NodeType customType() {
        return NodeType.parseNodeType(nodeType);
    }

    public void setSafelyEnumNodeType(NodeType nodeType) {
        this.nodeType = nodeType.getCodeNum();
    }
}
